package com.ye.service.impl;

import com.ye.domain.Music;
import com.ye.mapper.MusicMapper;
import com.ye.service.MusicSercices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MusicServices implements MusicSercices {
    @Autowired
    private MusicMapper musicMapper;
    @Override
    public List<Music> getMusicListByName(String songName) {
        return musicMapper.getMusicListByName(songName);
    }

    @Override
    public List<Music> fuzzySearch(String songName) {
        return musicMapper.fuzzySearch(songName);
    }

    @Override
    public void saveMusicData(Music music) {
        musicMapper.saveMusicData(music);
    }

    @Override
    public void batchSave(List<Music> musicList) {
        musicMapper.batchSave(musicList);
    }

    @Override
    public Integer countMusicNum() {
        return musicMapper.countMusicNum();
    }

    @Override
    public List<Music> rand12() {
        return musicMapper.rand12();
    }
}
